package com.cbgolf.oa.model;

import com.cbgolf.oa.base.BaseModel;
import com.cbgolf.oa.entity.ParkBean;
import com.cbgolf.oa.net.NetCallBack;
import com.cbgolf.oa.net.Web;
import com.cbgolf.oa.net.WebAPI;
import com.cbgolf.oa.presenter.IPresenterImp;

/**
 * Created by lq on 2018/1/27.
 */

public class FairwayModel extends BaseModel implements IBaseModel {

    private IPresenterImp worker;

    public FairwayModel(IPresenterImp worker) {
        this.worker = worker;
        getData();
    }

    @Override
    public void getData() {
        worker.showProgress();
        Web.getOK(WebAPI.park_details_select_get,
                new NetCallBack(response -> {
                    beanResult(response, ParkBean.class, worker);
                }));
    }
}
